#pragma once

#include "interfaces/ModePluginDockWidget.h"
#include "SurfaceMeshPlugins.h"
#include "geometry/Vector.h"
#include "SymmetryDetector.h"

class sym_detect_widget;

class sym_detect_plugin : public SurfaceMeshModePlugin
{
	Q_OBJECT
	Q_INTERFACES(ModePlugin)

	QIcon icon(){ return QIcon(":sym-detect-icon.png"); }

public:
    sym_detect_plugin();

	// Plugin interfaces
	void create();
	void destroy();
	void decorate();


public slots:
	// access to core functions
	void addModelToDocument(SurfaceMeshModel *model);
	void showStatusMessage(char *msg);

	// Parameters
	void setNumFeaturePoints(int n);
	void setNumBasePoints(int n);
	void setPairingThreshold(double thr);
	void setDistinctiveRatio(double ratio);

	void showPoints(int show);
	void showSignatures(int show);
	void showPrunedSignatures(int show);

	void detectReflection();
	void normalizeMesh();

	// test
	void test();
	void debug();
	void testICP();

private:
	QMap<QString, SymmetryDetector*>	sym_detectors;
	SymmetryDetector* activeSymmetryDetector();

	sym_detect_widget		*widget;
};

